import Main from '../components/main'
import Login from '../components/Login'
import NotFind from '../components/404'
import About from '../components/main/About'
import Home from '../components/main/Home'
import { Navigate } from 'react-router-dom'

const routes = [
  {
    path: '/login',
    element: <Login />
  },
  {
    path: '/main',
    element: <Main />,
    children: [
      {
        path: '/main/about',
        element: <About />,
      },
      {
        path: '/main/home',
        element: <Home />,
      }
    ]
  },
  {
    path: '/',
    element: <NotFind />
  },
  {
    path: '*',
    element: <Navigate to="/login" />
  }

]

export default routes
